package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhAdminSockMapper;
import com.ruoyi.xh.domain.XhAdminSock;
import com.ruoyi.xh.service.IXhAdminSockService;

/**
 * socketService业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhAdminSockServiceImpl extends ServiceImpl<XhAdminSockMapper,XhAdminSock> implements IXhAdminSockService {

    /**
     * 查询socket
     * 
     * @param id socket主键
     * @return socket
     */
    @Override
    public XhAdminSock selectXhAdminSockById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询socket列表
     * 
     * @param xhAdminSock socket
     * @return socket
     */
    @Override
    public Page<XhAdminSock> selectXhAdminSockList(XhAdminSock xhAdminSock)
    {
        return new Page<>();
    }

    /**
     * 新增socket
     * 
     * @param xhAdminSock socket
     *
     */
    @Override
    public void insertXhAdminSock(XhAdminSock xhAdminSock)
    {
        this.save(xhAdminSock);
    }

    /**
     * 修改socket
     * 
     * @param xhAdminSock socket
     *
     */
    @Override
    public void updateXhAdminSock(XhAdminSock xhAdminSock)
    {
        this.updateById(xhAdminSock);
    }

    /**
     * 批量删除socket
     * 
     * @param ids 需要删除的socket主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhAdminSockByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
